import { createApp } from '../../com/vue.js';
createApp({
    data() {
        return {
            list: [
                {
                    text: 'vue',
                    good: 0,
                    date: new Date().toLocaleDateString().replace(/\//g, '-'),
                },
            ],
            text: '',
        };
    },
    methods: {
        add(t) {
            this.list.push({
                text: t,
                good: 0,
                date: new Date().toLocaleDateString().replace(/\//g, '-'),
            });
        },
        good(i) {
            this.list[i].good++;
        },
        top(i) {
            this.list.unshift(this.list.splice(i, 1)[0]);
        },
        del(i) {
            this.list.splice(i, 1);
        },
    },
}).mount('#app');
